<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableThumb extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('thumb', function(Blueprint $table)
        {
            $table->increments('id')->comment('自增长');
            $table->integer('uid')->comment('用户ID，对应member表id');
            $table->string('url',4096)->comment('图片地址');
            $table->string('image',4096)->nullable()->comment('视频第一帧');
            $table->string('class')->comment('照片类别: 1相册 2图像 3视频');
            $table->string('status')->default(0)->comment('状态：0待审核，-1未通过，1审核通过，2首图');
            $table->tinyInteger('key')->comment('相片位置');
            $table->unsignedInteger('create_time')->comment('用户创建时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('thumb');
    }
}
